package com.unionpay.acp.test;

import java.text.DecimalFormat;

public class BaseResponse{

	private int code;
	private String message;
	private Object data;

	public BaseResponse(){

	}

	public BaseResponse(int code, String message) {
		this.code = code;
		this.message = message;
	}


	public BaseResponse(int code, String message, Object data) {
		this.code = code;
		this.message = message;
		this.data = data;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	@Override
	public String toString() {
		return "BaseResponse{" +
				"code=" + code +
				", message='" + message + '\'' +
				", data=" + data +
				'}';
	}

	public static void main(String[] args) {
		Double money = 10.1;
		DecimalFormat df   = new DecimalFormat("######0.00");
		DecimalFormat dfs   = new DecimalFormat("######0.#####");
		String format = df.format(money);
		System.out.println(format);
		System.out.println(dfs.format(Double.valueOf(format) * 100));
	}
}
